﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Kevin.Framework.Data.OrmMapping;

namespace Kevin.Framework.Data
{
    /// <summary>
    /// 服务返回结果
    /// </summary>
    /// <typeparam name="T"></typeparam>
    [Serializable]
    public class ServiceResult<T> where T : EntityBase
    {
        /// <summary>
        /// 成功与否
        /// </summary>
        public bool Successed
        {
            get;
            set;
        }
        /// <summary>
        /// 失败时的错误信息
        /// </summary>
        public string ErrorMsg
        {
            get;
            set;
        }

        /// <summary>
        /// 增删改实体时返回的实体信息
        /// </summary>       
        public T Object
        {
            get;
            set;
        }
        /// <summary>
        /// 当表格查询时返回的记录数
        /// </summary>
        public int RecordCount
        {
            get;
            set;
        }
        /// <summary>
        /// 当表格查询时返回的实体列表
        /// </summary>        
        public List<T> List
        {
            get;set;
        }
    }
}
